package org.dromara.crawler.domain;

import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import jakarta.persistence.Convert;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import lombok.Data;
import org.dromara.crawler.config.JSONObjectConverter;

/**
 * 模版管理
 *
 * @author shup
 * @date 2025-6-18
 */

@Data
@Entity(name="site_manager")
@TableName("site_manager")
public class SiteManager extends BasicEntity {

    @Id
    @TableId(type= IdType.ASSIGN_ID)
    private Long id;

    private String siteName;
    /**
     * 0 启动
     * 1 禁用
     */
    private String status;

    private String siteUrl;

    @Convert(converter = JSONObjectConverter.class)
    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONObject params;

}
